<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
  // number 类型 整数+ 小数
  let int_a = 1;
   let int_b =1.1;

   console.log(typeof int_b);

   // String 字符串类型
  let str_a = 'Hello';

  // boolean 布尔类型 true ==> 1   false ==> 0
  let bool_a =true;
  console.log(bool_a);

  let un1 = undefined;
  let nu2;
  console.log(un1);
  console.log(typeof nu2);

  let obj ={
    name:'张三',
    age:30
  };

  console.log(obj);
  //使用点(.) 来访问属于静态变量 遍历对象时需要使用obj[key]取值
  console.log(obj.name,obj.age);

  let arr = ['百度','搜狗','360'];
  console.log(arr);
  // 数组取值 array[下标] 下标从0开始
  console.log(arr[0]);

  obj.age=18;
  console.log(obj);

  obj.gender='男'
  console.log(obj);


</script>
</body>
</html>